/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package InterfaceCliente;

import java.awt.Color;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import pbl_cliente.*;

/**
 *
 * @author tayane
 */


public class TelaVisualizaCompromisso extends javax.swing.JFrame {

    private PBL_cliente cliente; 
    private String dadosCompromisso;
      // Cria um novo DefaultListModel  
    DefaultListModel listaConvidados = new DefaultListModel(); //lista para armazenar os convidados
    DefaultListModel listaRecusaram = new DefaultListModel(); //lista para armazenar os usuarios que recusaram o convite
    DefaultListModel listaConfirmados = new DefaultListModel(); //lista para armazenar os convidados
    
    public TelaVisualizaCompromisso() {
        
        initComponents();
        setVisible(true);
        setResizable(false);
        setLocationRelativeTo(null);

    }
    
    public TelaVisualizaCompromisso(PBL_cliente cl, String dadosDoComp){
        
        this.cliente = cl;
        this.dadosCompromisso = dadosDoComp;
        initComponents();
        setVisible(true);
        setResizable(false);
        setLocationRelativeTo(null);
        confirmaCompromisso.setForeground(Color.GREEN);
        recusaCompromisso.setForeground(Color.orange);
        editaCompromisso.setForeground(Color.BLUE);
        excluiCompromisso.setForeground(Color.red);
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    
    public void setDataCompromisso(String dataCompromisso) {
        this.dataCompromisso.setText(dataCompromisso);
        
    }

    public void setDescricaoCompromisso(String descricaoCompromisso) {
        this.descricaoCompromisso.setText(descricaoCompromisso);
    }

    public void setHoraFim(String horaFim) {
        this.horaFim.setText(horaFim);
    }

    public void setHoraInicio(String horaInicio) {
        this.horaInicio.setText(horaInicio);
    }

    public void setCriadorCompromisso(String criadorCompromisso) {
        this.criadorCompromisso.setText(criadorCompromisso);
    }
    
    public void setLocalCompromisso(String localCompromisso) {
        this.localCompromisso.setText(localCompromisso);
    }

    public void setTituloCompromisso(String tituloCompromisso) {
        this.tituloCompromisso.setText(tituloCompromisso);
    }
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        NomeAgendaEletronica1 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel13 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        tituloCompromisso = new javax.swing.JLabel();
        dataCompromisso = new javax.swing.JLabel();
        horaInicio = new javax.swing.JLabel();
        horaFim = new javax.swing.JLabel();
        localCompromisso = new javax.swing.JLabel();
        jScrollPane5 = new javax.swing.JScrollPane();
        descricaoCompromisso = new javax.swing.JTextArea();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        confirmaCompromisso = new javax.swing.JButton();
        recusaCompromisso = new javax.swing.JButton();
        editaCompromisso = new javax.swing.JButton();
        excluiCompromisso = new javax.swing.JButton();
        jlabel1 = new javax.swing.JLabel();
        criadorCompromisso = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        sair = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jListConfirmados = new javax.swing.JList();
        jScrollPane2 = new javax.swing.JScrollPane();
        jListRecusaram = new javax.swing.JList();
        jScrollPane3 = new javax.swing.JScrollPane();
        JListConvidados = new javax.swing.JList();

        jPanel2.setBackground(java.awt.Color.white);
        jPanel2.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N

        NomeAgendaEletronica1.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        NomeAgendaEletronica1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        NomeAgendaEletronica1.setText("Agenda Eletrônica");

        jLabel13.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel13.setText("Título:");

        jLabel15.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel15.setText("Data:");

        jLabel16.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel16.setText("Hora:");

        jLabel17.setFont(new java.awt.Font("Arial", 2, 13)); // NOI18N
        jLabel17.setText("às");

        jLabel18.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel18.setText("Local:");

        jLabel19.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel19.setText("Descrição:");

        jLabel20.setFont(new java.awt.Font("Arial", 2, 13)); // NOI18N
        jLabel20.setText("de");

        tituloCompromisso.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        tituloCompromisso.setText("título de compromisso");

        dataCompromisso.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        dataCompromisso.setText("data do compromomisso");

        horaInicio.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        horaInicio.setText("horaInicio");

        horaFim.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        horaFim.setText("horaFim");

        localCompromisso.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        localCompromisso.setText("local do compromisso");

        descricaoCompromisso.setColumns(20);
        descricaoCompromisso.setRows(5);
        jScrollPane5.setViewportView(descricaoCompromisso);

        jLabel21.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel21.setText("Convidados");

        jLabel22.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel22.setText("Confirmados");

        jLabel23.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jLabel23.setText("Não comparecerão");
        jLabel23.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        confirmaCompromisso.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        confirmaCompromisso.setText("Confirmar presença");
        confirmaCompromisso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                confirmaCompromissoconfirmaCompromissoActionPerformed(evt);
            }
        });

        recusaCompromisso.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        recusaCompromisso.setText("Recusar convite");

        editaCompromisso.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        editaCompromisso.setText("Editar");
        editaCompromisso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                editaCompromissoActionPerformed(evt);
            }
        });

        excluiCompromisso.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        excluiCompromisso.setText("Excluir");
        excluiCompromisso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                excluiCompromissoexcluiCompromissoActionPerformed(evt);
            }
        });

        jlabel1.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
        jlabel1.setText("Criador:");

        criadorCompromisso.setFont(new java.awt.Font("Arial", 0, 13)); // NOI18N
        criadorCompromisso.setText("título de compromisso");

        sair.setText("Sair");
        sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sairActionPerformed(evt);
            }
        });

        jScrollPane1.setViewportView(jListConfirmados);

        jScrollPane2.setViewportView(jListRecusaram);

        jScrollPane3.setViewportView(JListConvidados);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel18)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(localCompromisso)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(dataCompromisso)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tituloCompromisso)
                                .addGap(0, 234, Short.MAX_VALUE)))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jlabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(criadorCompromisso))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel16)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel20)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(horaInicio)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel17)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(horaFim)))
                        .addGap(61, 61, 61))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 521, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(74, Short.MAX_VALUE))))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(36, 36, 36)
                .addComponent(confirmaCompromisso)
                .addGap(52, 52, 52)
                .addComponent(recusaCompromisso)
                .addGap(40, 40, 40)
                .addComponent(editaCompromisso, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(excluiCompromisso, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(39, 39, 39))
            .addComponent(jSeparator3)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(74, 74, 74)
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel22)
                .addGap(107, 107, 107)
                .addComponent(jLabel23)
                .addGap(105, 105, 105))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(NomeAgendaEletronica1)
                .addGap(174, 174, 174)
                .addComponent(sair)
                .addGap(44, 44, 44))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(NomeAgendaEletronica1)
                    .addComponent(sair))
                .addGap(8, 8, 8)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(tituloCompromisso)
                    .addComponent(jlabel1)
                    .addComponent(criadorCompromisso))
                .addGap(19, 19, 19)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jLabel20)
                    .addComponent(horaInicio)
                    .addComponent(jLabel17)
                    .addComponent(horaFim)
                    .addComponent(jLabel18)
                    .addComponent(localCompromisso)
                    .addComponent(jLabel15)
                    .addComponent(dataCompromisso))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(jLabel19))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel23)
                    .addComponent(jLabel22)
                    .addComponent(jLabel21))
                .addGap(12, 12, 12)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGap(3, 3, 3)
                                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(confirmaCompromisso)
                                    .addComponent(recusaCompromisso)
                                    .addComponent(editaCompromisso)
                                    .addComponent(excluiCompromisso))
                                .addGap(24, 24, 24))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void confirmaCompromissoconfirmaCompromissoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_confirmaCompromissoconfirmaCompromissoActionPerformed
            
            boolean souConvidado = false;
            String convidados = this.dadosCompromisso.split(":")[10];
            String [] convidadosDivididos = convidados.split("#");
            System.out.println("quantidade de convidados: " + convidadosDivididos.length);
            
            for (int i = 0; i < convidadosDivididos.length; i++){               
                String email = convidadosDivididos[i].split(" - ")[1];            
                System.out.println("email do convidado: " + email);
                if (email.equals(this.cliente.getEmailUsuarioConectado())){
                    souConvidado = true;
                    System.out.println("Fui convidado!");
                }
            }
            if(souConvidado){
                
                JOptionPane.showMessageDialog(rootPane, "Convite confirmado");
                String aceitaCompromisso = "CONF_COMP:" + cliente.getEmailUsuarioConectado() + ":" + this.dadosCompromisso.split(":")[13];
                cliente.TrataMsgsVindasServidor(aceitaCompromisso);
            }
            else{
                JOptionPane.showMessageDialog(rootPane, "Você não foi convidado para este compromisso");
            }
        
    }//GEN-LAST:event_confirmaCompromissoconfirmaCompromissoActionPerformed

    private void excluiCompromissoexcluiCompromissoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_excluiCompromissoexcluiCompromissoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_excluiCompromissoexcluiCompromissoActionPerformed

    private void sairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sairActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_sairActionPerformed

    private void editaCompromissoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editaCompromissoActionPerformed
        if(cliente.getEmailUsuarioConectado().equals(dadosCompromisso.split(":")[4])){
            JOptionPane.showMessageDialog(rootPane, "Voce é o criador do compromisso mas se acalme que eu estou implementando a edição!");
        }
        else{
            JOptionPane.showMessageDialog(rootPane, "Você não pode editar este compromisso pois você não é o criador");
        }
    }//GEN-LAST:event_editaCompromissoActionPerformed

    public void setListaConvidadosNaTela(String convidados){
        //System.out.println("entrei no método setListaCnvidadosNaTela");
        listaConvidados.addElement(convidados);       
        this.JListConvidados.setModel(listaConvidados);     
    }
    
    public void setListaConfirmadosNaTela(String confirmados){
        //System.out.println("entrei no método setListaCnvidadosNaTela");
        listaConvidados.addElement(confirmados);       
        this.jListConfirmados.setModel(listaConfirmados);     
    }
    
    public void setListaRecusaramNaTela(String recusaram){
        //System.out.println("entrei no método setListaCnvidadosNaTela");
        listaRecusaram.addElement(recusaram);       
        this.jListRecusaram.setModel(listaRecusaram);     
    }
    
    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaVisualizaCompromisso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaVisualizaCompromisso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaVisualizaCompromisso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaVisualizaCompromisso.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TelaVisualizaCompromisso().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JList JListConvidados;
    private javax.swing.JLabel NomeAgendaEletronica1;
    private javax.swing.JButton confirmaCompromisso;
    private javax.swing.JLabel criadorCompromisso;
    private javax.swing.JLabel dataCompromisso;
    private javax.swing.JTextArea descricaoCompromisso;
    private javax.swing.JButton editaCompromisso;
    private javax.swing.JButton excluiCompromisso;
    private javax.swing.JLabel horaFim;
    private javax.swing.JLabel horaInicio;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JList jListConfirmados;
    private javax.swing.JList jListRecusaram;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JLabel jlabel1;
    private javax.swing.JLabel localCompromisso;
    private javax.swing.JButton recusaCompromisso;
    private javax.swing.JButton sair;
    private javax.swing.JLabel tituloCompromisso;
    // End of variables declaration//GEN-END:variables
}
